Magnetic storage systems such as hard disk drives are used to store data. The hard disk drives include one or more platters with an outer magnetic coating. The magnetic coating stores positive and negative magnetic fields that represent binary 1's and 0's. The platters are divided into concentric circles called tracks. The tracks are divided radially into sectors.
When the hard disk drives are manufactured, a servo writer/detector writes permanent servo wedges onto the platters between the sectors. The servo wedges contain data that is used by a read/write head to locate the tracks and sectors. The data includes track and sector numbers that are coded using Gray code.
Gray code represents consecutive decimal numbers using binary expressions that differ by only one bit. For example, the decimal numbers 0 and 1 can be represented by the binary Gray code numbers 00 and 01, respectively. The decimal number 2 can be represented by the binary Gray code number 11. The decimal number 3 can be represented by the binary Gray code number 10. Gray coded track/sector numbers are mapped using a second code and then written to a servo sector. The mapping codes provide additional protection against noise and increase reliability when the track/sector numbers are read back from the magnetic medium.
Dibit coding can be used to map the Gray coded track/sector numbers. Dibit code uses the bit 0000 to represent the Gray code bit 0 and the bits 1100 to represent the Gray code bit 1. During read back, the Gray coded track/sector numbers are represented by a number string. Adjacent samples in the number string are summed by a peak detector, which generates a second string of numbers. The peak detector uses a threshold to determine the Gray coded track/sector numbers based on the second string of numbers. A bad quality sample is declared when a sample in the second string of numbers is within a predetermined threshold. However, since Dibit code uses the bits 0000 to represent the Gray code bit 0, energy is only transmitted when the Gray code bit 1 is received. Therefore, there is no distinction between the transmission of the Gray code bit 0 and a condition when no signal being transmitted.
Manchester coding is also used to map the Gray coded track/sector numbers. Manchester code uses the bits 0011 to represent the Gray code bit 0 and the bits 1100 to represent the Gray code bit 1. During read back, the Gray code track/sector numbers are represented by a number string.
Adjacent samples in the number string are summed to generate a new string of numbers. A Viterbi detector then determines the Gray coded track/sector numbers based on the new string of numbers. A bad quality sample is declared when a sample in the new string of numbers is within a predetermined threshold. When Manchester coding is used, energy is transmitted when both of the Gray code bits 0 and 1 are transmitted. However, the predetermined threshold does not adequately determine the readback quality of the detected Gray code.